package com.example.firstapp.fragment

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import com.example.firstapp.R

class fragmentActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_fragment)

        val intent2fragment1: Button = findViewById(R.id.intent2fragment1)
        intent2fragment1.setOnClickListener {
            intent = Intent(this, fragment1::class.java)
            startActivity(intent)
        }
        val intent2fragment2: Button = findViewById(R.id.intent2fragment2)
        intent2fragment2.setOnClickListener {
            intent = Intent(this, fragment2::class.java)
            startActivity(intent)
        }
        val intent2fragment3: Button = findViewById(R.id.intent2fragment3)
        intent2fragment3.setOnClickListener {
            intent = Intent(this, fragment3::class.java)
            startActivity(intent)
        }
        val intent2fragment4: Button = findViewById(R.id.intent2fragment4)
        intent2fragment4.setOnClickListener {
            intent = Intent(this, fragment4news::class.java)
            startActivity(intent)
        }
    }
}